<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>西大网上书城 - 登录</title>
    <link rel="stylesheet" href="css/bookstore.css" />
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .container {
            width: 100%;
            max-width: 450px;
            animation: fadeIn 0.8s ease-out;
        }

        .logo {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-bottom: 30px;
        }

        .logo-icon {
            font-size: 32px;
            color: #ffd166;
        }

        .logo h1 {
            font-size: 28px;
            color: white;
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .login-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            padding: 40px 30px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .login-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
        }

        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .login-header h2 {
            font-size: 24px;
            color: var(--primary);
            margin-bottom: 10px;
        }

        .login-header p {
            color: var(--light-text);
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--dark-text);
            font-weight: 500;
            font-size: 14px;
        }

        .form-control {
            width: 100%;
            padding: 14px 15px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 15px;
            transition: all 0.3s;
            background-color: #f8f9fa;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(51, 102, 153, 0.1);
            background-color: var(--white);
        }

        .captcha-container {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .captcha-container img {
            border-radius: 6px;
            border: 1px solid var(--border);
            height: 45px;
            cursor: pointer;
            transition: opacity 0.3s;
        }

        .captcha-container img:hover {
            opacity: 0.8;
        }

        .captcha-input {
            flex: 1;
        }

        .btn-login {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: var(--white);
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 10px;
            box-shadow: 0 4px 10px rgba(51, 102, 153, 0.2);
        }

        .btn-login:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
            box-shadow: 0 6px 15px rgba(51, 102, 153, 0.3);
            transform: translateY(-2px);
        }

        .btn-login:active {
            transform: scale(0.98);
        }

        .login-footer {
            text-align: center;
            margin-top: 25px;
            color: var(--light-text);
            font-size: 14px;
        }

        .login-footer a {
            color: var(--primary);
            text-decoration: none;
            transition: color 0.2s;
        }

        .login-footer a:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

        @media (max-width: 480px) {
            .login-card {
                padding: 30px 20px;
            }

            .logo h1 {
                font-size: 24px;
            }
        }
    </style>
</head>
<body>
<div class="container">
    <div class="logo">
        <span class="logo-icon">📚</span>
        <h1>西大网上书城</h1>
    </div>

    <div class="login-card">
        <div class="login-header">
            <h2>系统登录</h2>
            <p>请输入您的账号信息</p>
        </div>

        <form action="./login" method="post">
            <div class="form-group">
                <label for="user">用户名</label>
                <input type="text" id="user" name="user" class="form-control" placeholder="请输入用户名" required>
            </div>

            <div class="form-group">
                <label for="pass">密码</label>
                <input type="password" id="pass" name="pass" class="form-control" placeholder="请输入密码" required>
            </div>

            <div class="form-group">
                <label for="code">验证码</label>
                <div class="captcha-container">
                    <input type="text" id="code" name="code" class="form-control captcha-input" placeholder="请输入验证码" required>
                    <img src="./captcha" alt="验证码" title="点击刷新验证码">
                </div>
            </div>

            <button type="submit" class="btn-login">登录系统</button>
        </form>

        <div class="login-footer">
            <a href="index.html">← 返回首页</a>
        </div>
    </div>
</div>
</body>
</html>